package com.lottery.im.widget;

import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;

/**
 * 作者：cyy
 * 时间：2018/9/25。
 */
public class CustomerLinearLayoutManager extends LinearLayoutManager {
  private boolean isScrollEnabled = true;

  public CustomerLinearLayoutManager(Context context) {
    super(context);
  }

  public void setScrollEnabled(boolean flag) {
    this.isScrollEnabled = flag;
  }

  @Override
  public boolean canScrollVertically() {
    //Similarly you can customize "canScrollHorizontally()" for managing horizontal scroll
    return isScrollEnabled && super.canScrollVertically();
  }
}
